package com.cy.pj.goods.service;

import com.cy.pj.goods.dao.GoodsDao;
import com.cy.pj.goods.pojo.Goods;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository

public class GoodsServiceImpl implements GoodsService{
    @Autowired
    GoodsDao goodsDao;

    @Override
    public List<Goods> findGoods() {
        List<Goods> goods = goodsDao.findGoods();
        return goods;
    }

    @Override
    public int deleteById(Integer id) {
        return goodsDao.deleteById(id);
    }

    @Override
    public int deleteByHenDuoId(String id) {
            return goodsDao.deleteByHenDuoId(id);
    }
}
